package game.core
{
	
	public class FLPoint
	{
		public function FLPoint(x:int=0,y:int=0)
		{
			this.x = x;
			this.y = y;
		}
		public var x:int =0;
		public var y:int =0;
		public var z:int = NONE;
		public var pan:FLPan;
		public var groups:Array = [];
		public static var NONE:int = 0; //空白点
		public static var ONE:int = 1;//第一个人占
		public static var TWO:int = 2;//第二个人占
		
		
		public function setFLPan(p:FLPan):void
		{
			this.pan = p;
		}
		
		public function addGroup(g:Group):void
		{
			groups.push(g);
		}
		
		//设置下棋
		public function onPutSide(side:int):Array
		{
			 if(this.z != NONE)
				 return null;
			 
			 this.z = side;
			 var a:Array = [];
			 for(var i:int = 0;i<groups.length;i++)
			 {
			 	var g:Group = groups[i];
				if(g!=null && g.checkSucc(this))
					a.push(g);
			 }
			 return a;
		}
		
	}
}